
import { preOrderFun } from '../tab-navigation/node_modules/@mall/api/order'
import $math from '../tab-navigation/node_modules/@src/common/math'
import router from "../tab-navigation/node_modules/@src/router";
import { storeBindingsBehavior } from "mobx-miniprogram-bindings";
import mall from "../tab-navigation/node_modules/@src/store/mall";
import base from "../tab-navigation/node_modules/@src/store/base";

Component({
  behaviors: [storeBindingsBehavior],
  storeBindings: [
    {
      store: base,
      fields: ['isiPhoneX', 'themeColor', 'themeTitleColor']
    }
  ],
  options: {
    addGlobalClass: true,
  },
  data: {
    iconList: [
      { icon: '/wxapp/static/shop-mall/profile/my_icon_waitpay.png', status: 'WAITING' },
      { icon: '/wxapp/static/shop-mall/profile/my_icon_inservice.png', status: 'PAYED' },
      { icon: '/wxapp/static/shop-mall/profile/my_icon_finish.png', status: 'FINISH' },
      //全部
      { icon: '/wxapp/static/shop-mall/profile/my_icon_all.png', status: 'ALL' }
    ]

  },
  methods: {
    onLoad: function (options) {
    },
    dumpOrderList(e) {

      let status = e.currentTarget.dataset.status;
      router.push({ name: 'mall/order-list', params: { status: status } })
    }

  }
})
